<template>
	<view class="container">
		<view class="tui-page__hd">
			<view class="tui-page__title">Chart</view>
			<view class="tui-page__desc">图表：简单图表以及引入图表库，该图表功能尚未完全覆盖常用场景，后续会继续更新完善</view>
		</view>
		<view class="tui-page__bd tui-page__spacing">
			<tui-button type="gray-primary" :size="34" bold width="372rpx" height="84rpx" margin="0 auto"
				@click="href(1)">css版本</tui-button>
			<tui-button type="gray-primary" :size="34" bold width="372rpx" height="84rpx" margin="40rpx auto"
				@click="href(2)">canvas版本</tui-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			href(type) {
				// let url = type == 1 ? '/pages/component/charts-css/charts-css' :
				// 	'/pages/component/charts-canvas/charts-canvas'
				if (type == 2) {
					this.toast()
				} else {
					this.tui.href('/pages/component/charts-css/charts-css')
				}
			},
			toast() {
				this.tui.toast('该功能正在开发中~')
			}
		}
	};
</script>

<style>

</style>
